#!/usr/bin/node

const log = console.log,
      fs = require('fs'),
      lnkname = process.argv[2],
      err = console.error;

if(process.argv.length !== 3 || typeof(lnkname) === 'undefined'){
  log('命令行参数不正确');
  process.exit(2);
}
try{
  // lnk -> src
  log(`${lnkname} - > ${fs.readlinkSync(lnkname)}`);

}catch(e){
  err(e.message);
  process.exit(1);
}
